Repository navigation
ref(profiling): Remove unused ContinuousScheduler.pause stub - #8224
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
ContinuousScheduler.pause() was added with continuous profiling in #2830 as a stub that raises NotImplementedError. Neither ThreadContinuousScheduler nor GeventContinuousScheduler implements it and nothing has ever called it.
Contributor
Coverage Results 📊✅ 137221 passed | ⏭️ 7456 skipped | Total: 144677 | Pass Rate: 94.85% | Execution Time: 465m 29s 📊 Comparison with Base Branch
✨ Test counts unchanged from base. All tests are passing successfully. ✅ Patch coverage is 100.00% (no changed executable lines found; target 80%). Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## master #8224 +/-##
==========================================
+ Coverage 90.30% 90.32% +0.02%
==========================================
Files 203 203 —
Tracked lines 26933 26931 -2
Branches 10058 10058 —
==========================================
+ Hits 24321 24324 +3
+ Misses 2612 2607 -5
- Partials 1518 1520 +2Generated by Coverage Action |
sentrivana
approved these changes
Nov 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes
ContinuousScheduler.pause()fromsentry_sdk/profiler/continuous_profiler.py(3 lines). It's a stub that only raisesNotImplementedError, and nothing implements it or calls it.#2830 (Jun 2024, "Introduce continuous profiling mode") added it next to
ensure_running()andteardown(). Unlike those two, no subclass ever overrode it, and the SDK never called it. The stub makes it look like the continuous profiler can be paused, but it can't.Evidence
git grep -nw pauseonmasterfinds only the definition. Nothing insentry_sdk/,tests/,scripts/ordocs/refers to it.ThreadContinuousSchedulerandGeventContinuousScheduler, the only subclasses, overrideensure_running()andteardown()but notpause().git log -S "def pause"finds only feat(profiling): Introduce continuous profiling mode #2830.git log -S ".pause("acrosssentry_sdkandtestsfinds no commits, so it has never had a caller.ContinuousSchedulerisn't exported fromsentry_sdk.profiler(__all__lists only the transaction-profiler schedulers) and isn't documented.continuous_profiler.py, but in different hunks (ThreadContinuousScheduler.__init__).Why it's safe
ContinuousScheduleris an internal class. The method is unreachable, so behavior doesn't change, and no public API or documented behavior is affected.Checks
uv run ruff check/ruff format --checkonsentry_sdk/profiler: cleanuv run --group typing mypy sentry_sdk: no issuesTESTPATH=tests/profiler uv run tox -e py3.14-common: 106 passed, 69 skipped. The skipped tests are the gevent cases, which need gevent installed.Issues
None. Found by the weekly sentry-python removal scout.
via automation
sched_65eed06cc199036c2b13411096f412d4· Run IDsched_65eed06cc199036c2b13411096f412d4:1794211200000.--
View Session [Sentry]